<?php if (!defined('THINK_PATH')) exit();?><!doctype html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
    <link rel="shortcut icon" href="/favicon.ico" />
    <title>金币充值</title>
    <link href="https://cdn.jsdelivr.net/bootstrap/3.3.4/css/bootstrap.min.css" type="text/css" rel="stylesheet" />
    <link href="/css/base.css" type="text/css" rel="stylesheet" />
    <link href="/css/main.css" type="text/css" rel="stylesheet" />
    <script src="https://cdn.jsdelivr.net/jquery/1.10.2/jquery.min.js"></script>
</head>
<body>
<div style="text-align:center;"></div>

    <div id="desktop" class="clearfix">
        <!--top-->
        <div id="top" class="clearfix">
	<a id="logo" href="#" class="fl">
		<img src="/images/logo.png" class="img-responsive"></a>
	<ul id="pc_nav" class="fr clearfix">
		<li><a href="/PersonalCenter">首页</a></li>
		<li><a href="/PersonalCenter/Pay">充值</a></li>
		<li><a href="javascript:checkOn('/PersonalCenter/WithdrawalAdd');">提现</a></li>
		<li><a href="/PersonalCenter/UserBetList">投注纪录</a></li>
		<li><a href="/PersonalCenter/UserList">领取推广奖励</a></li>
		
	</ul>
	<i id="phone_nav_btn" class="glyphicon fr" style="font-size: 15px;font-weight: bold;">菜单>></i>
	<ul id="phone_nav" data-num="0">
		<li><a href="/PersonalCenter">首页</a></li>
		<li><a href="/PersonalCenter/Pay">充值</a></li>
		<li><a href="javascript:checkOn('/PersonalCenter/WithdrawalAdd');">提现</a></li>
		<li><a href="/PersonalCenter/UserBetList">投注纪录</a></li>
		<li><a href="/PersonalCenter/UserList">领取推广奖励</a></li>
	</ul>
</div>
        <!--/top-->
        <!--main-->
        <div id="main">
            <div id="main_left" class="fl">
	<ul class="user clearfix">
		<li class="js-username">账户：<?php echo ($_SESSION ['username']); ?></li>
		<li class="js-usermoney" style="color:#B9FF00">余额：<?php echo ($_SESSION ['UserMoney']); ?></li>
		<li class="js-djmoney">冻结：0</li>
		<li class="js-usersummoney">战绩：<?php if($_SESSION ['sumMoney'] < 0): ?><span style="color:red;"><?php echo ($_SESSION ['sumMoney']); ?>(亏)</span><?php elseif($_SESSION ['sumMoney'] > 0): ?><span style="color:#FFE48D;"><?php echo ($_SESSION ['sumMoney']); ?>(盈)</span><?php else: ?>0<?php endif; ?></li>
		<li>推广：<?php echo ($_SESSION ['ref']); ?> &nbsp;人 </li>
	</ul>
	<ul class="user clearfix" style="padding-top:3px;margin: 5px 0;">
		<li><a href="/PersonalCenter/Pay" class="button">充 值</a><a class="button" href="/PersonalCenter/WithdrawalAdd">提 现</a><a class="button" href="javascript:LoadSignIn(1);">签 到</a></li>
		<li><a href="/Loginout" class="button">退出登陆</a><a class="button" href="/PersonalCenter/UserInformation">更换密码</a></li>
	</ul>
	<h4>玩法介绍</h4>
	<p>
		开奖结果：<span>取最后一位玩家下注时间的毫秒数(例:00:00:<b style="color:#7EAF03">643</b>)数字的总和除以2(13/2=6.5),除尽（无小数点）为<b style="color:#7EAF03">正</b>面,除不尽为<b style="color:#7EAF03">反</b>面。</span>
		<span>如果毫秒数只有两个正数(例:00:00:<b style="color:#7EAF03">603</b>)，则随机开出<b style="color:#7EAF03">正</b>面或者<b style="color:#7EAF03">反</b>面。</span>
	</p>
</div>
			<div id="main_center" class="fl p5 borderTop">  
				<div class="clearfix mb10" >
					<form id="rgForm" name="rgForm">
						<div class="input">
							用户帐号：<?php echo ($_SESSION ['username']); ?> <span style="margin-left:50px">帐号余额：<?php echo ($_SESSION ['UserMoney']); ?></span>
							<input data-val="true" data-val-number="字段 id 必须是一个数字。" data-val-required="The id field is required." id="id" name="id" type="hidden" value="10579" />
						</div>
						<div class="input">充值金额：<input style="border:1px solid #5cb85c;border-radius:3px;padding: 0 5px;margin-right:10px;color: #FFF;" type="text" id="rMoney" name="rMoney"  class="easyui-validatebox" missingMessage="请输入充值金额(元)" tipPosition="bottom" data-options="required:true,validType:'checkNum'" /><span style="color:#FFE48D;" id="czRMB">请输入充值金额(元)</span></div>
						<div class="input">快速选择：
							<label class="czje"><input type="radio" id="kMoney" name="rMoney" value="10" onClick="document.getElementById('rMoney').value='10'">10元</label>
							<label class="czje"><input type="radio" id="kMoney" name="rMoney" value="50" onClick="document.getElementById('rMoney').value='50'">50元</label>
							<label class="czje"><input type="radio" id="kMoney" name="rMoney" value="100" onClick="document.getElementById('rMoney').value='100'">100元</label></br>
							<label class="czje" style="margin-left:74px"><input type="radio" id="kMoney" name="rMoney" value="200" onClick="document.getElementById('rMoney').value='200'">200元</label>
							<label class="czje"><input type="radio" id="kMoney" name="rMoney" value="500" onClick="document.getElementById('rMoney').value='500'">500元</label>
							<label class="czje"><input type="radio" id="kMoney" name="rMoney" value="1000" onClick="document.getElementById('rMoney').value='1000'">1000元</label>
						</div>
						<div style="margin-top:10px;">支付方式：<span style="color:#FFE48D">充值金币1-5分钟到账</span></div>
						<div class="input clearfix" style="margin-top: 5px;">
							<div class="col-sm-4" style="text-align:center">
								<input id="zfb" type="radio" name="bankCode" value="300" checked="checked" />
								<label for="zfb"><img align="absmiddle" src="/images/pay/ali.png" width="99" height="66" alt="支付宝" border="0" /></label>
							</div>
							<div class="col-sm-4" style="text-align:center">
								<input id="wx" type="radio" name="bankCode" value="400"/>
								<label for="wx"><img align="absmiddle" src="/images/pay/wx.png" width="99" height="66" alt="微信支付" border="0" /></label>
							</div>
							<div class="col-sm-4" style="text-align:center">
								<input id="qq" type="radio" name="bankCode" value="500"/>
								<label for="qq"><img align="absmiddle" src="/images/pay/qq.png" width="99" height="66" alt="QQ支付" border="0" /></label>
							</div>
						</div>
					</form>
					<div style="clear:both;height:10px;"></div>
					<p class="description pb10 mb10 pt10 text-center">
						<span style="color:#FFE48D">充值比例：1 元 = 10000 金币</span>
					</p>
					<div class="text-center">
						<input type="button" id="btnPaysub" class="btn btn-green" value="确认支付" />
					</div>
				</div>
			</div>

<script type="text/javascript">
	var $remove = $("#rMoney");
	$remove.click(function(e){
		var checkedrMoney=document.getElementsByName("rMoney");
		var len = checkedrMoney.length;
		var i = 0;
		for(; i < len; i++){
			checkedrMoney[i].checked = false;
			}
		});
    $('#btnPaysub').click(function () {
	    if(document.getElementById("kMoney").checked){
        	var money = $('input[name="rMoney"]:checked').val();
	    }else{
        	var money = $("#rMoney").val();
	    }
        var checked = $('input[name="bankCode"]:checked').val();
        if (money == "") {
            $.messager.alert('提示:', "充值金额不能为空", "error", function () {
                $("#rMoney").focus();
            });
            return;
        }
        if (typeof (checked) == 'undefined') {
            $.messager.alert('提示:', "请选择支付方式", "error");
            return;
        }
        else {
            window.open("/Neto?rMoney=" + money + "&bankCode=" + checked);
        }
    });
    $("#rMoney").keyup(function () {
        var jb = $("#rMoney").val();
        if (jb > 0) {
            $.ajax({
                type: "post",
                url: "/PersonalCenter/rtRMB",    //后台webservice里的方法名称  
                data: { type: 1, money: jb },
                dataType: "json",
                success: function (data) {
                    if (data.Success) {
                        $("#czRMB").html("金币：" + data.Obj);
                    }
                },
                error: function (msg) {
                    $.messager.alert('提示:', "参数有误", "error");
                }
            });
        }
    });
</script>

            <div id="main_right" class="fl">
	<h4 class="clearfix" style="border-top:none">公告</h4>
		<ul style="height:150px;padding:5px 10px" id="newGGList">
		</ul>
	<div style="border-top:1px solid #006260;border-bottom:1px solid #006260"><a href="/PersonalCenter/EmailAdd" class="kefu" ><img src="/images/kf.png"></a></div>
	<p style="font-size:12px;margin:0;text-align:center;color:red">轻松娱乐，请勿沉迷</p>
	<a href="add.php" class="download"><img src="/images/downloadBtn.png" class="aligncenter" style="width:130px;"></a>
	<p style="font-size:12px;margin:0;text-align:center;line-height: 1.7;"><font style="color:yellow">推荐使用以下浏览器</font>
		<a href="http://www.google.cn/chrome/browser/desktop/index.html" target="_blank">谷歌浏览器</a>
		<a href="http://www.centbrowser.com/" target="_blank">百分浏览器</a>
		<a href="http://browser.qq.com/" target="_blank">QQ浏览器</a>
		<a href="http://ie.sogou.com/" target="_blank">搜狗浏览器</a>
		<a href="http://www.liebao.cn/" target="_blank">猎豹浏览器</a>
	</p>
</div>
        </div>
        <!--/main-->
        <script src="/js/signin.js"></script>
<link rel="stylesheet" type="text/css" href="/js/easyui/themes/default/easyui.min.css">
<script src="https://cdn.jsdelivr.net/jquery/1.11.3/jquery.min.js"></script>
<script src="/js/easyui/jquery.easyui.min.js"></script>
<script src="/js/easyui/easyui-lang-zh_CN.js"></script>
<marquee id="gonggao" onMouseOver="this.stop()" onMouseOut="this.start()">
平台在微信中被恶意举报，只需微信中点右上角菜单，选择在浏览器中打开即可。
</marquee>
</div>
<script>
	function checkOn(url) {
		$.ajax({
			url: "/PersonalCenter/CheckOn",//
			type: "post",
			dataType: "json",
			success: function (data) {
				if (data.Success) {
					location.href = url;
				} else {
					$.messager.alert('提示:', data.Msg, "error", function () {
						location.href = "/PersonalCenter/BankAdd";
					});
				}
			}
		});
	}
	$(function () {
		$.ajax({
			type: "post",
			url: "/PersonalCenter/NewsGG",
			data: { type: 2 },
			dataType: "json",
			success: function (data) {
				if (data.Success) {
					if (data.Msg != "0") {
						$.each(data.Obj, function (i, n) {
							$('#newGGList').append("<li><a href='/PersonalCenter/NewDetail?id=" + n["id"] + "'>" + n["title"] + "</a></li>");
						});
					}
				}
			}
		});
	});
</script>
</body>
</html>